package main

import (
	"path/filepath"

	"github.com/charmbracelet/bubbles/key"
	"github.com/charmbracelet/lipgloss"
	"github.com/mattn/go-runewidth"
)

var Version = "v0.0.1"

const APP_NAME = "go-walker" // HACK:this project output application name

const SEPARATOR = "    " // separator between columns

var (
	bold             = lipgloss.NewStyle().Bold(true)
	warning          = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).PaddingLeft(1).PaddingRight(1)
	preview          = lipgloss.NewStyle().PaddingLeft(2)
	cursor           = lipgloss.NewStyle().Background(lipgloss.Color("#825DF2")).Foreground(lipgloss.Color("#FFFFFF"))
	bar              = lipgloss.NewStyle().Background(lipgloss.Color("#5C5C5C")).Foreground(lipgloss.Color("#FFFFFF"))
	search           = lipgloss.NewStyle().Background(lipgloss.Color("#499F1C")).Foreground(lipgloss.Color("#FFFFFF"))
	danger           = lipgloss.NewStyle().Background(lipgloss.Color("#FF0000")).Foreground(lipgloss.Color("#FFFFFF"))
	fileSeparator    = string(filepath.Separator)
	showIcons        = false
	dirOnly          = false
	startPreviewMode = false
	fuzzyByDefault   = false
	strlen           = runewidth.StringWidth
)

var (
	keyForceQuit = key.NewBinding(key.WithKeys("ctrl+c"))
	keyQuit      = key.NewBinding(key.WithKeys("esc"))
	keyQuitQ     = key.NewBinding(key.WithKeys("q"))
	keyOpen      = key.NewBinding(key.WithKeys("enter"))
	keyBack      = key.NewBinding(key.WithKeys("backspace"))
	keyFnDelete  = key.NewBinding(key.WithKeys("delete"))
	keyUp        = key.NewBinding(key.WithKeys("up"))
	keyDown      = key.NewBinding(key.WithKeys("down"))
	keyLeft      = key.NewBinding(key.WithKeys("left"))
	keyRight     = key.NewBinding(key.WithKeys("right"))
	keyTop       = key.NewBinding(key.WithKeys("shift+up"))
	keyBottom    = key.NewBinding(key.WithKeys("shift+down"))
	keyLeftmost  = key.NewBinding(key.WithKeys("shift+left"))
	keyRightmost = key.NewBinding(key.WithKeys("shift+right"))
	keyPageUp    = key.NewBinding(key.WithKeys("pgup"))
	keyPageDown  = key.NewBinding(key.WithKeys("pgdown"))
	keyHome      = key.NewBinding(key.WithKeys("home"))
	keyEnd       = key.NewBinding(key.WithKeys("end"))
	keyVimUp     = key.NewBinding(key.WithKeys("k"))
	keyVimDown   = key.NewBinding(key.WithKeys("j"))
	keyVimLeft   = key.NewBinding(key.WithKeys("h"))
	keyVimRight  = key.NewBinding(key.WithKeys("l"))
	keyVimTop    = key.NewBinding(key.WithKeys("g"))
	keyVimBottom = key.NewBinding(key.WithKeys("G"))
	keySearch    = key.NewBinding(key.WithKeys("/"))
	keyPreview   = key.NewBinding(key.WithKeys(" "))
	keyDelete    = key.NewBinding(key.WithKeys("d"))
	keyUndo      = key.NewBinding(key.WithKeys("u"))
	keyYank      = key.NewBinding(key.WithKeys("y"))
	keyHidden    = key.NewBinding(key.WithKeys(".")) // is it work???

)

var (
	CMD_walker_remove = "WALKER_REMOVE_CMD"
)

var (
	Editor        = "EDITOR"
	Editor_walker = "WALKER_EDITOR"
)

var (
	app_run_init_width  = 80
	app_run_init_height = 60
)

// DONE
